Las Reliquias de Tolti Aph

An interactive fiction by Graham Nelson (2005) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Section 2(b) - La capacidad de la magia

Memorisation relates various people to various spells. The verb to know (he knows, they know, he knew, it is known) implies the memorisation relation.

Understand "hechizos" or "lista de hechizos" as listing spells. Listing spells is an action applying to nothing. Carry out listing spells: reel off the spells.[1]

After taking inventory: reel off the spells; continue the action.

To reel off the spells:
    say "Ahora mismo puedes recordar los siguientes hechizos:[line break]";
    repeat through the Table of Enchantments in cost column order[2]
    begin;
        let this spell be the spell entry;
        if the player knows this spell
        begin;
            say " [this spell] ([nature of this spell]): cuesta [cost of this spell] FUE";
            if the requirement of this spell is not aire, say ", requiere [requirement of this spell]";
            say "[line break]";
        end if;
    end repeat;
    say "[line break]".

Notes

[1]. Al igual que "DIAGNOSTICO", este comando y su consecuente acción ha sido añadidos para satisfacer la nostalgia de los testers.

[2]. Cada vez que necesitamos una lista de hechizos conocidos por el jugador, requerimos a la computadora que mire en la tabla de hechizos por orden de coste, lo cual es algo ineficientes - pero no causa un retraso perceptible en el juego. No listamos los hechizos en el orden correcto para empezar porque no nos importa, y porque sería problemático a la hora de añadir extensiones a las relgas más tarde; y no ordenamos la tabla por coste al principio del juego porque no se nos permite perturbar el orden de la tabla que define las propiedades fijadas a los valores.